-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #1179 Deprecated SPDX license #1263
Conversation
Fixes #1179 Deprecated SPDX license (GFDL* and BSD-2-Clause-NetBSD) Signed-off-by: Marc-Etienne Vargenau <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
Hi @vargenau, I made a bit of a change to this PR and regenerated the license list -- could you have a look through the result and confirm it is what you are expecting? Thanks! |
Signed-off-by: Keith Zantow <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"abc-1-or-later": "ABC-1.0-Or-later", | ||
"abc-1.0-or-later": "ABC-1.0-Or-later", | ||
"abc-1.0.0-or-later": "ABC-1.0-Or-later", | ||
"abc-1": "ABC-1.0-only", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that the casing has changed here, but just wanted to confirm for others who come across this that these are correct as of 3.18:
https://spdx.org/licenses/ <-- "or" and "only" are lower cased here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe these should be lower cased. I don't see any license with upper case variants.
@@ -43,7 +60,7 @@ func (l License) canReplace(other License) bool { | |||
} | |||
} | |||
|
|||
return l.ID != other.ID | |||
return l.ID == other.ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we have to flip this here? I admit it's a little hard to reason about this case since it's the last one checked with so many other chances of an early return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the look @spiffcs -- this function is canReplace
, I think we haven't seen this bug because the other negative test conditions failed first. Basically: this function is trying to find any license that could be replaced by another license by checking equality in almost all the other fields. However, when it gets to the end here, the condition previously here is "if the ID is NOT the same, we can consider it equal". Two comments about this: 1) this is not ever triggered based on the current document, and 2) I really don't think this is right -- if at the end of all the checks, the IDs are the same, it would return false
... which means maybe we have different Text
...
Thank you all for accepting and improving my patch. I confirm it works as expected for me. Can you also have a look at at pull request #1259 ? Thank you |
Please check also pull request #1266 One more deprecated SPDX license: StandardML-NJ |
Fixes #1179 Deprecated SPDX license (GFDL* and BSD-2-Clause-NetBSD)
Signed-off-by: Marc-Etienne Vargenau [email protected]